package cn.desk.parameter.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.desk.commons.service.IBaseService;
import cn.desk.commons.util.SessionProvider;
import cn.desk.parameter.entity.Parameter;

public class ParameterProvider implements SessionProvider {
	private IBaseService<Parameter> baseService;

	@Override
	public Map<String, Object> provider() {
		Parameter para = new Parameter();
		para.setPutSession(1);
		List<Parameter> par = baseService.list(para);
		Map<String,Object> map=new HashMap<String, Object>();
		for (Parameter p : par) {
			map.put(p.getId(), p.getRealValue());
		}
		return map;
	}

	public IBaseService<Parameter> getBaseService() {
		return baseService;
	}

	public void setBaseService(IBaseService<Parameter> baseService) {
		this.baseService = baseService;
	}

}
